/**
 * Collaborative Story Development Web Application (CSDApp) 
 * Copyright Anton Strack 2014
 *
 * This file is part of Collaborative Story Development Application (CSDApp).
 *
 * CSDApp is free software: you can redistribute it and/or modify it under the
 * terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or any later version.
 *
 * CSDApp is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * CSDApp. If not, see <http://www.gnu.org/licenses/>.
 *
 */
package csdwa;

import java.sql.Timestamp;

/**
 * This class represents a comment on a post.
 *
 * @author Anton Strack
 */
public class Comment extends Resource implements CsdwaRecordable, CsdwaNotifiable {

    /**
     * The name of the comment as seen by the end user.
     */
    private String name;
    /**
     * The body of the comment as seen by the end user.
     */
    private String body;
    /**
     * The resource type id of the parent post the comment is attached to.
     */
    private int parentResourceTypeId;
    /**
     * The resource id of the specific post the comment is attached to.
     */
    private int parentId;
    /**
     * The last updated date of the post the comment was written for. This helps
     * to indicate how old the comment is related to the post if it was updated
     * after the comment.
     */
    private Timestamp parentCommentedDate;
    /**
     * The user id of who updated the comment.
     */
    private int updatedById;
    /**
     * The timestamp of when the comment was updated.
     */
    private Timestamp updatedDate;
    /**
     * This variable is intended to store information that the site can use to
     * highlight specific sections of the parent post.
     */
    private String section;
    /**
     * The state id of the comment.
     */
    private int stateId;
    /**
     * The user id of who created the comment.
     */
    private int createdById;
    /**
     * The timestamp of when the comment was created
     */
    private Timestamp createdDate;

    Comment(int resourceTypeId) {
        this.resourceTypeId = resourceTypeId;
    }

    /**
     * The name of the comment as seen by the end user.
     *
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * The name of the comment as seen by the end user.
     *
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * The body of the comment as seen by the end user.
     *
     * @return the body
     */
    public String getBody() {
        return body;
    }

    /**
     * The body of the comment as seen by the end user.
     *
     * @param body the body to set
     */
    public void setBody(String body) {
        this.body = body;
    }

    /**
     * The resource type id of the parent post the comment is attached to.
     *
     * @return the parentResourceTypeId
     */
    public int getParentResourceTypeId() {
        return parentResourceTypeId;
    }

    /**
     * The resource type id of the parent post the comment is attached to.
     *
     * @param parentResourceTypeId the parentResourceTypeId to set
     */
    public void setParentResourceTypeId(int parentResourceTypeId) {
        this.parentResourceTypeId = parentResourceTypeId;
    }

    /**
     * The resource id of the specific post the comment is attached to.
     *
     * @return the parentId
     */
    public int getParentId() {
        return parentId;
    }

    /**
     * The resource id of the specific post the comment is attached to.
     *
     * @param parentId the parentId to set
     */
    public void setParentId(int parentId) {
        this.parentId = parentId;
    }

    /**
     * The last updated date of the post the comment was written for. This helps
     * to indicate how old the comment is related to the post if it was updated
     * after the comment.
     *
     * @return the postCommentedDate
     */
    public Timestamp getParentCommentedDate() {
        return parentCommentedDate;
    }

    /**
     * The last updated date of the post the comment was written for. This helps
     * to indicate how old the comment is related to the post if it was updated
     * after the comment.
     *
     * @param postCommentedDate the postCommentedDate to set
     */
    public void setParentCommentedDate(Timestamp postCommentedDate) {
        this.parentCommentedDate = postCommentedDate;
    }

    /**
     * The user id of who updated the comment.
     *
     * @return the updatedById
     */
    public int getUpdatedById() {
        return updatedById;
    }

    /**
     * The user id of who updated the comment.
     *
     * @param updatedById the updatedById to set
     */
    public void setUpdatedById(int updatedById) {
        this.updatedById = updatedById;
    }

    /**
     * The timestamp of when the comment was updated.
     *
     * @return the updatedDate
     */
    public Timestamp getUpdatedDate() {
        return updatedDate;
    }

    /**
     * The timestamp of when the comment was updated.
     *
     * @param updatedDate the updatedDate to set
     */
    public void setUpdatedDate(Timestamp updatedDate) {
        this.updatedDate = updatedDate;
    }

    /**
     * This variable is intended to store information that the site can use to
     * highlight specific sections of the parent post.
     *
     * @return the section
     */
    public String getSection() {
        return section;
    }

    /**
     * This variable is intended to store information that the site can use to
     * highlight specific sections of the parent post.
     *
     * @param section the section to set
     */
    public void setSection(String section) {
        this.section = section;
    }

    /**
     * The state id of the comment.
     *
     * @return the stateId
     */
    public int getStateId() {
        return stateId;
    }

    /**
     * The state id of the comment.
     *
     * @param stateId the stateId to set
     */
    public void setStateId(int stateId) {
        this.stateId = stateId;
    }

    /**
     * The user id of who created the comment.
     *
     * @return the createdById
     */
    public int getCreatedById() {
        return createdById;
    }

    /**
     * The user id of who created the comment.
     *
     * @param createdById the createdById to set
     */
    public void setCreatedById(int createdById) {
        this.createdById = createdById;
    }

    /**
     * The timestamp of when the comment was created
     *
     * @return the createdDate
     */
    public Timestamp getCreatedDate() {
        return createdDate;
    }

    /**
     * The timestamp of when the comment was created
     *
     * @param createdDate the createdDate to set
     */
    public void setCreatedDate(Timestamp createdDate) {
        this.createdDate = createdDate;
    }
}
